﻿using System.Collections.Generic;
using System.ServiceModel;
using StockholmsStad.Runtime.Serialization.DataContract;
using StockholmsStad.Runtime.Serialization.DataContract.Enums;
using StockholmsStad.Utilities.Exceptions;
using System;

namespace StockholmsStad.ServiceModel.Interfaces
{
    /// <summary>
    /// 
    /// </summary>
    [ServiceContract]
    public interface ICeremonyService
    {

        //TODO Flytta alla metoder som har men Ceremony till denna tjänst

        /// <summary>
        /// 
        /// </summary>
        /// <param name="user"></param>
        /// <param name="dateTime"></param>
        /// <returns></returns>
        [OperationContract]
        [FaultContract(typeof(StockholmStadApplicationErrorFault))]
        [FaultContract(typeof(StockholmStadSystemErrorFault))]
        List<CeremonySummary> GetIndividualCeremonyBookingForDate(User user, DateTime dateTime);

        /// <summary>
        /// 
        /// </summary>
        /// <param name="user"></param>
        /// <param name="fromDate"></param>
        /// <param name="toDate"></param>
        /// <param name="ministerId"></param>
        /// <returns></returns>
        [OperationContract]
        [FaultContract(typeof(StockholmStadApplicationErrorFault))]
        [FaultContract(typeof(StockholmStadSystemErrorFault))]
        List<CeremonySummary> GetIndividualCeremonyBooking(User user, DateTime fromDate, DateTime? toDate, int? ministerId);

        /// <summary>
        /// 
        /// </summary>
        /// <param name="user"></param>
        /// <param name="dateTime"></param>
        /// <param name="ministerId"></param>
        /// <returns></returns>
        [OperationContract]
        [FaultContract(typeof(StockholmStadApplicationErrorFault))]
        [FaultContract(typeof(StockholmStadSystemErrorFault))]
        List<CeremonySummaryDetails> GetIndividualCeremonyBookingDetails(User user, DateTime dateTime, int? ministerId);

        /// <summary>
        /// 
        /// </summary>
        /// <param name="user"></param>
        /// <param name="dateTime"></param>
        /// <returns></returns>
        [OperationContract]
        [FaultContract(typeof(StockholmStadApplicationErrorFault))]
        [FaultContract(typeof(StockholmStadSystemErrorFault))]
        List<CeremonySummary> GetOrdinaryCeremonyBookingForDate(User user, DateTime dateTime);

        /// <summary>
        /// 
        /// </summary>
        /// <param name="user"></param>
        /// <param name="fromDate"></param>
        /// <param name="toDate"></param>
        /// <param name="ministerId"></param>
        /// <returns></returns>
        [OperationContract]
        [FaultContract(typeof(StockholmStadApplicationErrorFault))]
        [FaultContract(typeof(StockholmStadSystemErrorFault))]
        List<CeremonySummary> GetOrdinaryCeremonyBooking(User user, DateTime fromDate, DateTime? toDate, int? ministerId);

        /// <summary>
        /// 
        /// </summary>
        /// <param name="user"></param>
        /// <param name="dateTime"></param>
        /// <returns></returns>
        [OperationContract]
        [FaultContract(typeof(StockholmStadApplicationErrorFault))]
        [FaultContract(typeof(StockholmStadSystemErrorFault))]
        List<CeremonySummaryDetails> GetOrdinaryCeremonyBookingDetails(User user, DateTime dateTime);

        /// <summary>
        /// 
        /// </summary>
        /// <param name="user"></param>
        /// <returns></returns>
        [OperationContract]
        [FaultContract(typeof(StockholmStadApplicationErrorFault))]
        [FaultContract(typeof(StockholmStadSystemErrorFault))]
        DateTime GetNextCeremonyDateForIndividualService(User user);

        /// <summary>
        /// 
        /// </summary>
        /// <param name="user"></param>
        /// <returns></returns>
        [OperationContract]
        [FaultContract(typeof(StockholmStadApplicationErrorFault))]
        [FaultContract(typeof(StockholmStadSystemErrorFault))]
        DateTime GetNextCeremonyDateForOrdinaryService(User user);

        /// <summary>
        /// 
        /// </summary>
        /// <param name="user"></param>
        /// <returns></returns>
        [OperationContract]
        [FaultContract(typeof(StockholmStadApplicationErrorFault))]
        [FaultContract(typeof(StockholmStadSystemErrorFault))]
        DateTime GetPreviousCeremonyDateForIndividualService(User user);

        /// <summary>
        /// 
        /// </summary>
        /// <param name="user"></param>
        /// <returns></returns>
        [OperationContract]
        [FaultContract(typeof(StockholmStadApplicationErrorFault))]
        [FaultContract(typeof(StockholmStadSystemErrorFault))]
        DateTime GetPreviousCeremonyDateForOrdinaryService(User user);

    }
}
